/*
https://leetcode.cn/problems/egg-drop-with-2-eggs-and-n-floors/description/
1884. 鸡蛋掉落-两枚鸡蛋
*/

class Solution {
public:
    int twoEggDrop(int n) {
 int sum = 0;
        int index = 0;
        for(int i = 1;sum< n ;i++){
            sum += i; 
            index = i;
        }
        return index; 
    }
};